package com.yunhe.device.domain.base;

import com.yunhe.common.annotation.EnumItemCode;
import com.yunhe.common.annotation.NameTitle;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.neo4j.ogm.annotation.GeneratedValue;
import org.neo4j.ogm.annotation.Id;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Property;

/**
 * @ClassName AanlogType
 * @Description 点号类型模型
 * @Author HeTao
 * @Date 2021/7/13 17:27
 * @Version 1.0
 **/
@ApiModel(value = "PointDataType", description = "点号类型模型")
@NodeEntity
@Data
public class PointDataType implements Comparable<PointDataType> {
    @Id
    @GeneratedValue
    private Long id;

    @Property
    @ApiModelProperty("点号类型编码")
    private String name;

    @Property
    @ApiModelProperty("点号类型名称")
    private String title;

    @Property
    @ApiModelProperty("监测类型")
    private String type;

    @Property
    @ApiModelProperty("排序")
    private Long sn;

    @Property
    @ApiModelProperty("创建时间")
    private String createTime;

    @Property
    @ApiModelProperty("更新时间")
    private String updateTime;

    @Property
    private String activity="1";


    @Property
    private boolean initData=false;

    @ApiModelProperty(value = "点号类型  01  后台生成  02 用户自定义",required = false)
    @Property
    private String  backType="01";

    @Override
    public int compareTo(PointDataType o) {
        if (o == null) {
            return 1;
        }
        if (this.sn == null) {
            return -1;
        } else if (o.getSn() == null) {
            return 1;
        }
        return this.sn.compareTo(o.getSn());
    }
}
